-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
feat: expose async wrap providers under async_hooks module #40760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expose async wrap providers under async_hooks module #40760
Conversation
doc/api/async_hooks.md
Outdated
| added: REPLACEME | ||
| --> | ||
| * Returns: A list of providers supported by async wrap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we define anywhere what a "provider" is?
Also, to me "A list" means an array, but an object is returned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it wasn't defined, at least publically. I can reword that for sure, but, to be honest, I don't know how to define the providers description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Returns: A list of providers supported by async wrap. | |
| * Returns: A map of provider types supported by async wrap. |
I would also add something to the description linking it to type parameter of the init(...) hook.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just did, thanks for point that out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few nits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| * Returns: A map of provider types to the corresponding numeric id. | ||
| This map contains all the event types that might be emitted by the `async_hooks.init()` event. | ||
| This feature suppresses the deprecated usage of `process.binding('async_wrap').Providers`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a link to DEP0111
|
Nit: My understaning of the commit message guideline tells that the commit message should start with |
|
I would just squash it all before merging and give it the async_hooks subsystem prefix then. |
f95a743 to
29ad912
Compare
docs: add asyncWrapProviders api doc tests(async_hooks): use internalBinding for comparisson fix(test-async-wrap): lint error docs: use REPLACEME for asyncWrapProviders update: use freeze and copy for asyncWrapProviders update(async_hooks): use primordials on asyncWrapProviders fix: use common to expect error docs(asyncWrapProviders): rephrase return type fix: lint md fix: lint md docs(async_hooks): typo Co-authored-by: Stephen Belanger <[email protected]> update(asyncWrapProviders): add __proto__ as null Co-authored-by: Simone Busoli <[email protected]> Co-authored-by: Michaël Zasso <[email protected]> test: adjust __proto__ assertion docs: add DEP0111 link
29ad912 to
c19f6e2
Compare
Address: #40730.